package com.atguigu.spring.aop.log;

import java.lang.reflect.Method;
import java.util.Arrays;

public class LogUtils {
    public static void logStart(Method method, Object args[]) {
        System.out.println("【日志】：【" + method.getName() + "】开始, 参数：" + Arrays.toString(args));
    }

    public static void logEnd(Method method) {
        System.out.println("【日志】：【" + method.getName() + "】结束");
    }
    public static void logResult(Method method, Object result) {
        System.out.println("【日志】：【" + method.getName() + "】, 结果：" + result);
    }

    public static void logException(Method method, Throwable e) {
        System.out.println("【日志】：【" + method.getName() + "】异常, 异常信息：" + e.getCause());
    }

}
